﻿<!DOCTYPE HTML>
<html>
<head>
    <meta charset="utf-8">
    <meta name="renderer" content="webkit|ie-comp|ie-stand">
    <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
    <meta name="viewport" content="width=device-width,initial-scale=1,minimum-scale=1.0,maximum-scale=1.0,user-scalable=no" />
    <meta http-equiv="Cache-Control" content="no-siteapp" />
    <link href="/static/s/hui/static/h-ui/css/H-ui.min.css" rel="stylesheet" type="text/css" />
    <link href="/static/s/hui/static/h-ui.admin/css/H-ui.login.css" rel="stylesheet" type="text/css" />
    <link href="/static/s/hui/static/h-ui.admin/css/style.css" rel="stylesheet" type="text/css" />
    <link href="/static/s/hui/lib/Hui-iconfont/1.0.7/iconfont.css" rel="stylesheet" type="text/css" />
    <title> 代理商后台</title>
    <meta name="keywords" content="">
    <meta name="description" content="">
</head>
<body id="body">
<input type="hidden" id="TenantId" name="TenantId" value="" />
<div class="header" style="background-image: none;color:white;font-size:26px;text-align:center;">代理商后台</div>
<div class="loginWraper">
    <div id="loginform" class="loginBox">
        <form id="form" class="form form-horizontal" action="index.php?app=Admin&mod=Index&act=login" method="post">
            <div class="row cl">
                <label class="form-label col-xs-3"><i class="Hui-iconfont">&#xe60d;</i></label>
                <div class="formControls col-xs-8">
                    <input id="username" name="username" type="text" placeholder="账户" class="input-text size-L">
                </div>
            </div>
            <div class="row cl">
                <label class="form-label col-xs-3"><i class="Hui-iconfont">&#xe60e;</i></label>
                <div class="formControls col-xs-8">
                    <input id="password" name="password" type="password" placeholder="密码" class="input-text size-L">
                </div>
            </div>
            <div class="row cl">
                <div class="formControls col-xs-8 col-xs-offset-3">
                    <input id="verifyCode" name="verifyCode" class="input-text size-L" type="text" placeholder="验证码" style="width:150px;">
                    <img src="index.php?app=Admin&mod=Index&act=verifyCode" id="verifyCodeImg"> <a id="kanbuq" href="javascript:;">刷新</a> </div>
            </div>
            <div class="row cl">
                <div class="formControls col-xs-8 col-xs-offset-3">
                    <input name="" type="submit" class="btn btn-success radius size-L" value="&nbsp;登&nbsp;&nbsp;&nbsp;&nbsp;录&nbsp;">
                    <input name="" type="reset" class="btn btn-default radius size-L" value="&nbsp;取&nbsp;&nbsp;&nbsp;&nbsp;消&nbsp;">
                </div>
            </div>
            <div  id="errorTips" class="row cl hidden">
                <div class="formControls col-xs-6 col-xs-offset-3">
                    <div class="Huialert Huialert-info"><i class="icon-remove"></i><span id="errmsg"></span></div>
                </div>
            </div>
        </form>
    </div>
</div>
<div class="footer">Copyright  XXXXX软件科技有限公司</div>
<script type="text/javascript" src="/static/s/hui/lib/jquery/1.9.1/jquery.min.js"></script>
<script type="text/javascript" src="/static/s/hui/static/h-ui/js/H-ui.js"></script>
<script type="text/javascript" src="/static/s/js/common.js"></script>
<script type="text/javascript" src="/static/s/hui/lib/jquery.validation/1.14.0/jquery.validate.min.js"></script>
<script type="text/javascript" src="/static/s/hui/lib/jquery.validation/1.14.0/validate-methods.js"></script>
<script>
    $(function() {
        var dfh = document.documentElement.clientHeight;
        $(window).resize(function(e){
            $(".loginWraper").css("height", dfh+'px');
            $(".footer").css("top", (dfh-parseInt($(".footer")[0].offsetHeight))+'px');
            return false;
        });
        function verifyReload() {
            $("#verifyCodeImg").attr("src", $("#verifyCodeImg").attr("src") + "&t=" + (new Date).getMilliseconds());
        }
        function showError(msg) {
            $("#errmsg").html(msg);
            $("#errorTips").removeClass("hidden");
        }
        function hideError() {
            $("#errorTips").addClass("hidden");
        }

        $("#kanbuq").click(function () {
            verifyReload();
        });
        AjaxFormSubmit("#form", function(json){
            showError(json.msg);
            window.location.href = json.data.redirect;
        },function(msg){
            showError(msg);
            verifyReload();
        }, false, function(){
            hideError();
            var username = $("#username").val();
            var password = $("#password").val();
            var verifyCode = $("#verifyCode").val();
            if(username.trim() == "") {
                showError("用户名不能为空");
                return false;
            }
            if(password == "") {
                showError("密码不能为空");
                return false;
            }
            if(password.length < 6) {
                showError("密码不能小于6位");
                return false;
            }
            if(verifyCode == "" || verifyCode=="验证码") {
                showError("验证码不能为空");
                return false;
            }
            return true;
        });
    });
</script>
</body>
</html>
